<template>
  <div class="reimbursement">
    <reimburelment
      key="0"
      :activeName="activeName"
      :invoice_body_belong="activeName"
      v-if="activeName == 0"
    ></reimburelment>
    <reimburelment
      key="1"
      :activeName="activeName"
      :invoice_body_belong="activeName"
      v-if="activeName == 1"
    ></reimburelment>
    <reimburelment
      key="2"
      :activeName="activeName"
      :invoice_body_belong="activeName"
      v-if="activeName == 2"
    ></reimburelment>
  </div>
</template>
<script>
import reimburelment from "./commponents/reimburelment.vue";
export default {
  name: "reimburSement",
  components: { reimburelment },
  data() {
    return {
      activeName: "0",
    };
  },
  mounted() {},
  watch: {
    $route: {
      handler(newV, oldV) {
        if (this.$route.query.type == 0) {
          this.activeName = "0";
        } else if (this.$route.query.type == 1) {
          this.activeName = "1";
        } else if (this.$route.query.type == 2) {
          this.activeName = "2";
        }
      },
      immediate: true,
      deep: true,
    },
  },
  methods: {
    // tab选中
    handleClick(value) {
      this.activeName = value;
    },
  },
};
</script>

<style lang="less" scoped>

::v-deep .el-tabs--border-card {
  -webkit-box-shadow: none;
  box-shadow: none;
  border: none;
}

.reimbursement {
  padding: 10px 15px;
  background-color: #fff;
}
</style>